Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\Anil-Neeru>mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 16
Server version: 5.5.27 MySQL Community Server (GPL)

Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> show engines;
+--------------------+---------+--------------------------------------------------------------
--+--------------+------+------------+
| Engine             | Support | Comment
  | Transactions | XA   | Savepoints |
+--------------------+---------+--------------------------------------------------------------
--+--------------+------+------------+
| FEDERATED          | NO      | Federated MySQL storage engine
  | NULL         | NULL | NULL       |
| MRG_MYISAM         | YES     | Collection of identical MyISAM tables
  | NO           | NO   | NO         |
| MyISAM             | YES     | MyISAM storage engine
  | NO           | NO   | NO         |
| BLACKHOLE          | YES     | /dev/null storage engine (anything you write to it disappears
) | NO           | NO   | NO         |
| CSV                | YES     | CSV storage engine
  | NO           | NO   | NO         |
| MEMORY             | YES     | Hash based, stored in memory, useful for temporary tables
  | NO           | NO   | NO         |
| ARCHIVE            | YES     | Archive storage engine
  | NO           | NO   | NO         |
| InnoDB             | DEFAULT | Supports transactions, row-level locking, and foreign keys
  | YES          | YES  | YES        |
| PERFORMANCE_SCHEMA | YES     | Performance Schema
  | NO           | NO   | NO         |
+--------------------+---------+--------------------------------------------------------------
--+--------------+------+------------+
9 rows in set (0.03 sec)

mysql> SHOW DATABASES;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| cdcol              |
| mysql              |
| nb158g             |
| performance_schema |
| phpmyadmin         |
| test               |
| webauth            |
+--------------------+
8 rows in set (0.04 sec)

mysql> use nb158g;
Database changed
mysql> show tables;
+------------------+
| Tables_in_nb158g |
+------------------+
| users            |
+------------------+
1 row in set (0.00 sec)

mysql> SELECT * FROM `users`;
+----+--------------+----------------+----------+---------------------+---------------------+-
-------+
| id | name         | email          | password | added_date          | modified_date       |
status |
+----+--------------+----------------+----------+---------------------+---------------------+-
-------+
|  1 | rasmus       | zeev@andi.com  | 1q1q1q   | 2013-10-08 09:37:48 | 2013-10-08 09:37:48 |
1      |
|  2 | rasmus       | zeev@andi.com  | 1q1q1q   | 2013-10-08 09:37:57 | 2013-10-08 09:37:57 |
1      |
|  3 | rasmus       | zeev@andi.com  | 1q1q1q   | 2013-10-08 09:38:39 | 2013-10-08 09:38:39 |
1      |
|  4 | Zeev Suraski | zeev@zend.com  | 1q12q1   | 2013-10-08 09:40:24 | 2013-10-08 09:40:24 |
0      |
|  5 | Zeev Suraski | test@gmail.com | 1q1q1q   | 2013-10-08 09:41:41 | 2013-10-08 09:41:41 |
1      |
|  6 | Zeev Suraski | test@gmail.com | 1q1q1q   | 2013-10-08 09:41:44 | 2013-10-08 09:41:44 |
1      |
+----+--------------+----------------+----------+---------------------+---------------------+-
-------+
6 rows in set (0.00 sec)

mysql> SELECT `id`,`name` FROM `users`;
+----+--------------+
| id | name         |
+----+--------------+
|  1 | rasmus       |
|  2 | rasmus       |
|  3 | rasmus       |
|  4 | Zeev Suraski |
|  5 | Zeev Suraski |
|  6 | Zeev Suraski |
+----+--------------+
6 rows in set (0.00 sec)

mysql> BEGIN;
Query OK, 0 rows affected (0.00 sec)

mysql> UPDATE `users` SET `name`='amit kumar' WHERE `id`=5;
Query OK, 1 row affected (0.07 sec)
Rows matched: 1  Changed: 1  Warnings: 0

mysql> SAVEPOINT a;
Query OK, 0 rows affected (0.00 sec)

mysql> SELECT `id`,`name` FROM `users`;
+----+--------------+
| id | name         |
+----+--------------+
|  1 | rasmus       |
|  2 | rasmus       |
|  3 | rasmus       |
|  4 | Zeev Suraski |
|  5 | amit kumar   |
|  6 | Zeev Suraski |
+----+--------------+
6 rows in set (0.00 sec)

mysql> UPDATE `users` SET `name`='prashant singh' WHERE `id`=2;
Query OK, 1 row affected (0.00 sec)
Rows matched: 1  Changed: 1  Warnings: 0

mysql> SAVEPOINT b;
Query OK, 0 rows affected (0.00 sec)

mysql> SELECT `id`,`name` FROM `users`;
+----+----------------+
| id | name           |
+----+----------------+
|  1 | rasmus         |
|  2 | prashant singh |
|  3 | rasmus         |
|  4 | Zeev Suraski   |
|  5 | amit kumar     |
|  6 | Zeev Suraski   |
+----+----------------+
6 rows in set (0.00 sec)

mysql> ROLLBACK a;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to
 your MySQL server version for the right syntax to use near 'a' at line 1
mysql> ROLLBACK;
Query OK, 0 rows affected (0.05 sec)

mysql> SELECT `id`,`name` FROM `users`;
+----+--------------+
| id | name         |
+----+--------------+
|  1 | rasmus       |
|  2 | rasmus       |
|  3 | rasmus       |
|  4 | Zeev Suraski |
|  5 | Zeev Suraski |
|  6 | Zeev Suraski |
+----+--------------+
6 rows in set (0.00 sec)

mysql>
